<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
          integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

    <title>渠道运营工具</title>
</head>
<body>
<div class="row">
    <div class="col-md-6 col-sm-12 col-xs-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3>渠道运营数据库</h3>
            </div>
            <div class="panel-body">
                <form action="/add" method="get">
                    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
                    <input type="submit" value="增加" />
                </form>
                <form action="/index" method="get">
                    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
                    <input type="text" name="q", placeholder="{{q}}" id="search" />
                    <input type="submit" value="搜索" >
                </form>
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <td>渠道名称</td>
                            <td>渠道日期</td>
                            <td>渠道地址</td>
                            <td>情报提供人</td>
                            <td>公司名称</td>
                            <td>公司描述</td>
                            <td>公司标签</td>
                            <td>人物姓名</td>
                            <td>人物描述</td>
                            <td>职务</td>
                            <td>电话</td>
                            <td>邮箱</td>
                            <td>已入库</td>
                            <td>已对接</td>
                            <td>对接日期</td>
                            <td>对接人</td>
                            <td>对接需求</td>
                            <td>创建时间</td>
                            <td>编辑</td>
                            <td>删除</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for record in records %}
                            <tr>
                                <td>{{ record["channel_name"] }}</td>
                                <td>{{ record["channel_date"] }}</td>
                                <td>{{ record["channel_address"] }}</td>
                                <td>{{ record["channel_contributor"] }}</td>
                                <td>{{ record["company"] }}</td>
                                <td>{{ record["company_description"] }}</td>
                                <td>{{ record["company_tags"] }}</td>
                                <td>{{ record["person"] }}</td>
                                <td>{{ record["person_description"] }}</td>
                                <td>{{ record["person_title"] }}</td>
                                <td>{{ record["phone"] }}</td>
                                <td>{{ record["email"] }}</td>
                                <td>{{ record["is_stored"] }}</td>
                                <td>{{ record["is_touched"] }}</td>
                                <td>{{ record["touched_date"] }}</td>
                                <td>{{ record["touched_person"] }}</td>
                                <td>{{ record["demand"] }}</td>
                                <td>{{ record["create_time"] }}</td>
                                <td><a href="edit/{{ record._id }}">编辑</a></td>
                            <td><a href="delete/{{ record._id }}">删除</a></td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

    </div>

</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
        crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
        integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
        crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
        crossorigin="anonymous"></script>


</body>
</html>